package cn.nebula.music.domain;

import java.io.Serializable;
import java.sql.Date;
import java.util.Set;

import org.springframework.context.annotation.Lazy;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(value = { "handler" })

public class Singer implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Integer id;
	private String chinesename;
	private String foreignname;
	private String alias;
	private String introduction;
	private String nationality;
	private String constellation;
	private String sex;
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date birthday;
	private Integer heat;
	private Set<Album> albums;
	private Picture picture;
	private Set<Song> songs;
	private Set<Classification> classifications;
	private Set<User> users;
	private Set<Combination> combinations;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getChinesename() {
		return chinesename;
	}

	public void setChinesename(String chinesename) {
		this.chinesename = chinesename;
	}

	public String getForeignname() {
		return foreignname;
	}

	public void setForeignname(String foreignname) {
		this.foreignname = foreignname;
	}

	public String getAlias() {
		return alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public String getIntroduction() {
		return introduction;
	}

	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}

	public String getNationality() {
		return nationality;
	}

	public void setNationality(String nationality) {
		this.nationality = nationality;
	}

	public String getConstellation() {
		return constellation;
	}

	public void setConstellation(String constellation) {
		this.constellation = constellation;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public Integer getHeat() {
		return heat;
	}

	public void setHeat(Integer heat) {
		this.heat = heat;
	}

	public Set<Album> getAlbums() {
		return albums;
	}

	public void setAlbums(Set<Album> albums) {
		this.albums = albums;
	}

	public Picture getPicture() {
		return picture;
	}

	public void setPicture(Picture pictures) {
		this.picture = pictures;
	}

	public Set<Song> getSongs() {
		return songs;
	}

	public void setSongs(Set<Song> songs) {
		this.songs = songs;
	}

	public Set<Classification> getClassifications() {
		return classifications;
	}

	public void setClassifications(Set<Classification> classifications) {
		this.classifications = classifications;
	}

	public Set<User> getUsers() {
		return users;
	}

	public void setUsers(Set<User> users) {
		this.users = users;
	}

	public Set<Combination> getCombinations() {
		return combinations;
	}

	public void setCombinations(Set<Combination> combinations) {
		this.combinations = combinations;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	@Override
	public String toString() {
		return "Singer [id=" + id + ", chinesename=" + chinesename + ", foreignname=" + foreignname + ", alias=" + alias
				+ ", introduction=" + introduction + ", nationality=" + nationality + ", constellation=" + constellation
				+ ", sex=" + sex + ", birthday=" + birthday + ", heat=" + heat + ", albums=" + albums + ", picture="
				+ picture + ", songs=" + songs + ", classifications=" + classifications + ", users=" + users
				+ ", combinations=" + combinations + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((albums == null) ? 0 : albums.hashCode());
		result = prime * result + ((alias == null) ? 0 : alias.hashCode());
		result = prime * result + ((birthday == null) ? 0 : birthday.hashCode());
		result = prime * result + ((chinesename == null) ? 0 : chinesename.hashCode());
		result = prime * result + ((classifications == null) ? 0 : classifications.hashCode());
		result = prime * result + ((combinations == null) ? 0 : combinations.hashCode());
		result = prime * result + ((constellation == null) ? 0 : constellation.hashCode());
		result = prime * result + ((foreignname == null) ? 0 : foreignname.hashCode());
		result = prime * result + ((heat == null) ? 0 : heat.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((introduction == null) ? 0 : introduction.hashCode());
		result = prime * result + ((nationality == null) ? 0 : nationality.hashCode());
		result = prime * result + ((picture == null) ? 0 : picture.hashCode());
		result = prime * result + ((sex == null) ? 0 : sex.hashCode());
		result = prime * result + ((songs == null) ? 0 : songs.hashCode());
		result = prime * result + ((users == null) ? 0 : users.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Singer other = (Singer) obj;
		if (albums == null) {
			if (other.albums != null)
				return false;
		} else if (!albums.equals(other.albums))
			return false;
		if (alias == null) {
			if (other.alias != null)
				return false;
		} else if (!alias.equals(other.alias))
			return false;
		if (birthday == null) {
			if (other.birthday != null)
				return false;
		} else if (!birthday.equals(other.birthday))
			return false;
		if (chinesename == null) {
			if (other.chinesename != null)
				return false;
		} else if (!chinesename.equals(other.chinesename))
			return false;
		if (classifications == null) {
			if (other.classifications != null)
				return false;
		} else if (!classifications.equals(other.classifications))
			return false;
		if (combinations == null) {
			if (other.combinations != null)
				return false;
		} else if (!combinations.equals(other.combinations))
			return false;
		if (constellation == null) {
			if (other.constellation != null)
				return false;
		} else if (!constellation.equals(other.constellation))
			return false;
		if (foreignname == null) {
			if (other.foreignname != null)
				return false;
		} else if (!foreignname.equals(other.foreignname))
			return false;
		if (heat == null) {
			if (other.heat != null)
				return false;
		} else if (!heat.equals(other.heat))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (introduction == null) {
			if (other.introduction != null)
				return false;
		} else if (!introduction.equals(other.introduction))
			return false;
		if (nationality == null) {
			if (other.nationality != null)
				return false;
		} else if (!nationality.equals(other.nationality))
			return false;
		if (picture == null) {
			if (other.picture != null)
				return false;
		} else if (!picture.equals(other.picture))
			return false;
		if (sex == null) {
			if (other.sex != null)
				return false;
		} else if (!sex.equals(other.sex))
			return false;
		if (songs == null) {
			if (other.songs != null)
				return false;
		} else if (!songs.equals(other.songs))
			return false;
		if (users == null) {
			if (other.users != null)
				return false;
		} else if (!users.equals(other.users))
			return false;
		return true;
	}

}
